package com.jianan.mis.data.domain.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the internal_organization table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="internal_organization"
 */

public abstract class BaseInternalOrganization  implements Serializable {

	public static String REF = "InternalOrganization";
	public static String PROP_NAME = "Name";
	public static String PROP_CONTACT_PHONE2 = "ContactPhone2";
	public static String PROP_CONTACT_PHONE1 = "ContactPhone1";
	public static String PROP_COOPERATE_END_DATE = "CooperateEndDate";
	public static String PROP_COOPERATE_START_DATE = "CooperateStartDate";
	public static String PROP_CONTACT_NAME2 = "ContactName2";
	public static String PROP_CONTACT_NAME1 = "ContactName1";
	public static String PROP_ID = "Id";
	public static String PROP_CONTACT_EMAIL1 = "ContactEmail1";
	public static String PROP_CONTACT_EMAIL2 = "ContactEmail2";


	// constructors
	public BaseInternalOrganization () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseInternalOrganization (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseInternalOrganization (
		java.lang.Integer id,
		java.lang.String name,
		java.util.Date cooperateStartDate,
		java.lang.String contactName1,
		java.lang.String contactPhone1) {

		this.setId(id);
		this.setName(name);
		this.setCooperateStartDate(cooperateStartDate);
		this.setContactName1(contactName1);
		this.setContactPhone1(contactPhone1);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String name;
	private java.util.Date cooperateStartDate;
	private java.util.Date cooperateEndDate;
	private java.lang.String contactName1;
	private java.lang.String contactPhone1;
	private java.lang.String contactEmail1;
	private java.lang.String contactName2;
	private java.lang.String contactPhone2;
	private java.lang.String contactEmail2;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: name
	 */
	public java.lang.String getName () {
		return name;
	}

	/**
	 * Set the value related to the column: name
	 * @param name the name value
	 */
	public void setName (java.lang.String name) {
		this.name = name;
	}



	/**
	 * Return the value associated with the column: cooperate_start_date
	 */
	public java.util.Date getCooperateStartDate () {
		return cooperateStartDate;
	}

	/**
	 * Set the value related to the column: cooperate_start_date
	 * @param cooperateStartDate the cooperate_start_date value
	 */
	public void setCooperateStartDate (java.util.Date cooperateStartDate) {
		this.cooperateStartDate = cooperateStartDate;
	}



	/**
	 * Return the value associated with the column: cooperate_end_date
	 */
	public java.util.Date getCooperateEndDate () {
		return cooperateEndDate;
	}

	/**
	 * Set the value related to the column: cooperate_end_date
	 * @param cooperateEndDate the cooperate_end_date value
	 */
	public void setCooperateEndDate (java.util.Date cooperateEndDate) {
		this.cooperateEndDate = cooperateEndDate;
	}



	/**
	 * Return the value associated with the column: contact_name1
	 */
	public java.lang.String getContactName1 () {
		return contactName1;
	}

	/**
	 * Set the value related to the column: contact_name1
	 * @param contactName1 the contact_name1 value
	 */
	public void setContactName1 (java.lang.String contactName1) {
		this.contactName1 = contactName1;
	}



	/**
	 * Return the value associated with the column: contact_phone1
	 */
	public java.lang.String getContactPhone1 () {
		return contactPhone1;
	}

	/**
	 * Set the value related to the column: contact_phone1
	 * @param contactPhone1 the contact_phone1 value
	 */
	public void setContactPhone1 (java.lang.String contactPhone1) {
		this.contactPhone1 = contactPhone1;
	}



	/**
	 * Return the value associated with the column: contact_email1
	 */
	public java.lang.String getContactEmail1 () {
		return contactEmail1;
	}

	/**
	 * Set the value related to the column: contact_email1
	 * @param contactEmail1 the contact_email1 value
	 */
	public void setContactEmail1 (java.lang.String contactEmail1) {
		this.contactEmail1 = contactEmail1;
	}



	/**
	 * Return the value associated with the column: contact_name2
	 */
	public java.lang.String getContactName2 () {
		return contactName2;
	}

	/**
	 * Set the value related to the column: contact_name2
	 * @param contactName2 the contact_name2 value
	 */
	public void setContactName2 (java.lang.String contactName2) {
		this.contactName2 = contactName2;
	}



	/**
	 * Return the value associated with the column: contact_phone2
	 */
	public java.lang.String getContactPhone2 () {
		return contactPhone2;
	}

	/**
	 * Set the value related to the column: contact_phone2
	 * @param contactPhone2 the contact_phone2 value
	 */
	public void setContactPhone2 (java.lang.String contactPhone2) {
		this.contactPhone2 = contactPhone2;
	}



	/**
	 * Return the value associated with the column: contact_email2
	 */
	public java.lang.String getContactEmail2 () {
		return contactEmail2;
	}

	/**
	 * Set the value related to the column: contact_email2
	 * @param contactEmail2 the contact_email2 value
	 */
	public void setContactEmail2 (java.lang.String contactEmail2) {
		this.contactEmail2 = contactEmail2;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jianan.mis.data.domain.InternalOrganization)) return false;
		else {
			com.jianan.mis.data.domain.InternalOrganization internalOrganization = (com.jianan.mis.data.domain.InternalOrganization) obj;
			if (null == this.getId() || null == internalOrganization.getId()) return false;
			else return (this.getId().equals(internalOrganization.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}